package com.caregiver.watch.business.user.model.vo;

import com.caregiver.watch.business.user.model.po.UserContact;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @Description: 联系人
 * @Author 疆戟
 * @Date 2025/8/22 22:13
 * @Version 1.0
 */
@Data
@Schema(title = "联系人")
public class ContactVo {

    @Schema(description = "联系人ID")
    private Long id;

    @Schema(description = "联系人名称")
    private String name;

    @Schema(description = "联系人手机号")
    private String phone;


    public static ContactVo build(UserContact contact) {
        ContactVo vo = new ContactVo();
        vo.id = contact.getId();
        vo.name = contact.getContactName();
        vo.phone = contact.getPhoneNumber();
        return vo;
    }
}
